package com.walker.taogong.datamodel;

import java.util.Set;

public class Task
{
    private int id;
    //标题
    private String taskTitle;
    
    //任务发布者
    private String owner;
    
    //任务类型
    private TaskCategory category;
    
    //任务分配方式
    private AssignType assignType;
    
    //任务涉及的地址
    private Set<Address> addresses;
    
    //任务描述
    private String description;
    
    //任务涉及金额
    private TaskPay taskPay;
    
    //任务分配截止日期
    private String confirmDeadLine;
    
    //任务完成截止日期
    private String finishDeadLine;
    
    //任务隐私 Public: 对所有人开放 Private : 只对注册工人开放
    private TaskPrivacy taskPrivacy;
    
    //任务发布日期
    private String postDate;
    
    //任务状态
    private TaskStatus status;
    
    //任务对话
    private Set<TaskConversation> conversations;
    
    private Set<TaskHistory> taskHistories;


    public int getId()
    {
        return id;
    }

    public void setId(int id)
    {
        this.id = id;
    }

    public String getTaskTitle()
    {
        return taskTitle;
    }

    public void setTaskTitle(String taskTitle)
    {
        this.taskTitle = taskTitle;
    }

    public String getOwner()
    {
        return owner;
    }

    public void setOwner(String owner)
    {
        this.owner = owner;
    }

    public TaskCategory getCategory()
    {
        return category;
    }

    public void setCategory(TaskCategory category)
    {
        this.category = category;
    }

    public char getAssignType()
    {
        return assignType.getType();
    }

    public void setAssignType(AssignType assignType)
    {
        this.assignType = assignType;
    }
    
    public void setAssignType(char type)
    {
        this.assignType = AssignType.valueOf(type);
    }

    public Set<Address> getAddresses()
    {
        return addresses;
    }

    public void setAddresses(Set<Address> addresses)
    {
        this.addresses = addresses;
    }

    public String getDescription()
    {
        return description;
    }

    public void setDescription(String description)
    {
        this.description = description;
    }

    public TaskPay getTaskPay()
    {
        return taskPay;
    }

    public void setTaskPay(TaskPay taskPay)
    {
        this.taskPay = taskPay;
    }

    public String getConfirmDeadLine()
    {
        return confirmDeadLine;
    }

    public void setConfirmDeadLine(String confirmDeadLine)
    {
        this.confirmDeadLine = confirmDeadLine;
    }

    public String getFinishDeadLine()
    {
        return finishDeadLine;
    }

    public void setFinishDeadLine(String finishDeadLine)
    {
        this.finishDeadLine = finishDeadLine;
    }

    public char getTaskPrivacy()
    {
        return taskPrivacy.getType();
    }

    public void setTaskPrivacy(TaskPrivacy taskPrivacy)
    {
        this.taskPrivacy = taskPrivacy;
    }
    
    public void setTaskPrivacy(char type)
    {
        this.taskPrivacy = TaskPrivacy.valueOf(type);
    }

    public String getPostDate()
    {
        return postDate;
    }

    public void setPostDate(String postDate)
    {
        this.postDate = postDate;
    }

    public char getStatus()
    {
        return status.getStatus();
    }

    public void setStatus(TaskStatus status)
    {
        this.status = status;
    }
    
    public void setStatus(char status)
    {
        this.status = TaskStatus.valueOf(status);
    }

    public Set<TaskConversation> getConversations()
    {
        return conversations;
    }

    public void setConversations(Set<TaskConversation> conversations)
    {
        this.conversations = conversations;
    }

    public Set<TaskHistory> getTaskHistories()
    {
        return taskHistories;
    }

    public void setTaskHistories(Set<TaskHistory> taskHistories)
    {
        this.taskHistories = taskHistories;
    }
    
    
    
    

}
